home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Game-Power
/
Amiga Game-Power.iso
/
pd mix i
/
pict saver
/
analyrim
/
dbmsdocs.zoo
/
analyplot.doc
< prev
next >
Wrap
Text File
|
1992-01-05
|
4KB
|
74 lines
AnalyRIM's PLOT function
AnalyRIM has a primitive designed to allow it to cooperate with a plotting
program such as GnuPLOT to plot data from the spreadsheet on whatever
output devices the plot program handles (which for GnuPLOT are many!).
This is handled by a command PL which plots one or two ranges (depending
on whether you want to plot only Y coordinates or both X and Y coordinates)
and a convention to allow title and the like information to be passed.
The command added is
PL v1:v2,v3:v4;systemcommand
and the action is the following:
The first range v1:v2 must be a cell range (horizontal, vertical or
page) which corresponds to the X coordinates to plot if the v3:v4
argument exists, or which corresponds to the Y coordinates if
not. The second range, if present, must be another legal range
(in any direction). Both ranges must be one dimensional and
should be the same length if both are present.
AnalyRim will produce a file named "pccplt.dat" in the default
directory containing the values of the cells in the one or two
ranges, either one value per line (if only v1:v2 is in the
command) or two values per line (if both exist) so that the
lines each contain one point to be plotted. This is the format
GnuPlot (among others) want.
In addition, the contents of the FORMULAS for accumulators X,
Y, and Z will be placed in a file "titleinfo.txt" also in the default
directory. These may be used to pass titles, commands to format the
plot, or whatever. In the case of GnuPLOT, even a "load" command may
be placed here to do fancier formatting using some other predefined
file. The first 80 characters of each formula are copied without
further examination.
Once these files are created (and closed), AnalyRIM executes a command
which is either the "systemcommand" part of the PL command, or which
defaults to the command @DK:PLTFIL.PCP on VMS, to EXECUTE DK:PLTFIL.PCP
on AmigaDos, and to the command /DK/PLTFIL.PCP in Unix. The system
command part can be whatever syntax is desired, but will generally be a
script which will run the plot program and get it to read the data (and
possibly title information) and produce a plot. The plot output and
format may be controlled by the input passed to the plot program.
The reason the X, Y, and Z accumulator formulae don't have any pre-added
text is to allow this text to be placed in the accumulator.
It is expected that for actual use, a command file to AnalytiCalc
will be devised to be activated by a function key, and that this file
will cause title information to be placed in the X/Y/formulae and
will select the range(s) to be plotted and the style of the plot.
By moving this functionality to a separate program, AnalyRIM avoids
having to duplicate work already available, yet permits plotting to
be done (once some setup is done) as conveniently as if the plotting
code were linked in.
For the benefit of VMS users, GNUPLOT is included in this area already
built for VMS, and a ZOO archive of the Gnuplot sources is present also
which can be built for other machines. Amiga GnuPlot may be found in the
[.analyrim.amiga] directory. Also a template PLTFIL.PCP is present
which may be copied to DK: for VMS to give a linear plot on a Tektronix
mode screen. For the title material to be useful, the X/Y/Z accumulator
formulae need to contain commands like "title=mumble" and one
would have to edit PLTFIL.PCP to include a command "load titleinfo.txt"
to pull those commands in. You need to edit PLTFIL.PCP in any case to
reflect your desired terminal type and so on. You also need to be
aware that the first cell range you give is the X and the second is the
Y coordinates where you give two. If you omit the X coordinates and have
only one range, Gnuplot will assume X coordinates 1,2,3,...
Other plotting programs can be used as desired. The AnalytiCalc
plot program, which reads saved AnalytiCalc spreadsheets, can also
of course be used to plot whatever is wanted from an already-saved
sheet. The PL command interface is more interactive, though, and the plotting
engine more capable in some ways.